/*
 * SVPView.java
 */

package svp;
import java.awt.Color;
import org.jdesktop.application.Action;
import org.jdesktop.application.ResourceMap;
import org.jdesktop.application.SingleFrameApplication;
import org.jdesktop.application.FrameView;
import org.jdesktop.application.TaskMonitor;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.text.DecimalFormat;
import java.util.Calendar;
import java.util.Collections;
import java.util.HashMap;
import javax.swing.Timer;
import javax.swing.Icon;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import java.util.List;
import java.util.Map;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import javax.swing.JOptionPane;
import svp.CompanyEntryForm;





/**
 * The application's main frame.
 */
public class SVPView extends FrameView {
   
   // public String[] customerNames;
   
    
    public SVPView(SingleFrameApplication app) {
        super(app);
        
        
        try{
        initComponents();
        }
        
        catch(Exception e){
            
            JOptionPane.showMessageDialog(JOptionPane.getRootFrame(), e.getMessage(),"Error Opening SVP Retail", JOptionPane.ERROR_MESSAGE);       
        }
         cef = new CustomerEntryForm(this.getFrame(), true); 
        
        // status bar initialization - message timeout, idle icon and busy animation, etc
        ResourceMap resourceMap = getResourceMap();
        int messageTimeout = resourceMap.getInteger("StatusBar.messageTimeout");
        messageTimer = new Timer(messageTimeout, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                statusMessageLabel.setVisible(true);
                statusMessageLabel.setText("Welcome to SVP application ");
            }
        });
        messageTimer.setRepeats(false);
        
        
        int busyAnimationRate = resourceMap.getInteger("StatusBar.busyAnimationRate");
        for (int i = 0; i < busyIcons.length; i++) {
            busyIcons[i] = resourceMap.getIcon("StatusBar.busyIcons[" + i + "]");
        }
        busyIconTimer = new Timer(busyAnimationRate, new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                busyIconIndex = (busyIconIndex + 1) % busyIcons.length;
                statusAnimationLabel.setIcon(busyIcons[busyIconIndex]);
            }
        });
        idleIcon = resourceMap.getIcon("StatusBar.idleIcon");
        statusAnimationLabel.setIcon(idleIcon);
        progressBar.setVisible(true);

        // connecting action tasks to status bar via TaskMonitor
        TaskMonitor taskMonitor = new TaskMonitor(getApplication().getContext());
        taskMonitor.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
            public void propertyChange(java.beans.PropertyChangeEvent evt) {
                String propertyName = evt.getPropertyName();
                if ("started".equals(propertyName)) {
                    if (!busyIconTimer.isRunning()) {
                        statusAnimationLabel.setIcon(busyIcons[0]);
                        busyIconIndex = 0;
                        busyIconTimer.start();
                    }
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(true);
                } else if ("done".equals(propertyName)) {
                    busyIconTimer.stop();
                    statusAnimationLabel.setIcon(idleIcon);
                    progressBar.setVisible(false);
                    progressBar.setValue(0);
                } else if ("message".equals(propertyName)) {
                    String text = (String)(evt.getNewValue());
                    statusMessageLabel.setText((text == null) ? "" : text);
                    messageTimer.restart();
                } else if ("progress".equals(propertyName)) {
                    int value = (Integer)(evt.getNewValue());
                    progressBar.setVisible(true);
                    progressBar.setIndeterminate(false);
                    progressBar.setValue(value);
                }
            }
        });
        //customer Name
        
    } 
    
    @Action
    public void refreshCustomerNameCB(){
   // jComboBox1.addItem("Raja");
     List<String> customerNameList = SVPPUEntityManager.createNamedQuery("CustomerTbl.name").getResultList();
    //customerNameList.add(customerName);
    Collections.sort(customerNameList);
//    for(String l: customerNameList){
//        System.out.println(l);
//    }
//    
    jComboBox1.setModel(new javax.swing.DefaultComboBoxModel (customerNameList.toArray()));
//    for(int i=0;i<jComboBox1.getItemCount();i++)
//    System.out.println(i + " Item 1 : " + jComboBox1.getItemAt(i));
//    
    new S17NonStrict(jComboBox1);
    JTextField field = (JTextField)jComboBox1.getEditor().getEditorComponent();
    field.setText("");

//    System.out.println("Updated customer name combo box......");
    }
      
    @Action
    public void showAboutBox() {
        if (aboutBox == null) {
            JFrame mainFrame = SVPApp.getApplication().getMainFrame();
            aboutBox = new SVPAboutBox(mainFrame);
            aboutBox.setLocationRelativeTo(mainFrame);
        }

          SVPApp.getApplication().show(aboutBox);

    }
    
   @Action
    public void showCustomerEntryForm() {
        if(customerEntryForm==null){
            JFrame mainFrame = SVPApp.getApplication().getMainFrame();
            customerEntryForm = new CustomerEntryForm(mainFrame, true);
            customerEntryForm .setLocationRelativeTo(mainFrame);
        }
        
          SVPApp.getApplication().show(customerEntryForm);

    }
    
   @Action
    public void showProductEntryForm() {
        if(productEntryForm == null){
            JFrame mainFrame = SVPApp.getApplication().getMainFrame();
            productEntryForm = new ProductEntryForm(mainFrame, true);
            productEntryForm .setLocationRelativeTo(mainFrame);
        }

          SVPApp.getApplication().show(productEntryForm);

    }
   
    @Action
    public void showCompanyEntryForm() {
        if(companyEntryForm == null){
            JFrame mainFrame = SVPApp.getApplication().getMainFrame();
            companyEntryForm = new CompanyEntryForm(mainFrame, true);
            companyEntryForm .setLocationRelativeTo(mainFrame);
        }

          SVPApp.getApplication().show(companyEntryForm);

    }
   
   
    
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {
        bindingGroup = new org.jdesktop.beansbinding.BindingGroup();

        mainPanel = new javax.swing.JPanel();
        toolbarPanel = new javax.swing.JPanel();
        invoiceDetailPanel = new javax.swing.JPanel();
        invoiceTypePanel = new javax.swing.JPanel();
        cashBillRB = new javax.swing.JRadioButton();
        creditBillRB = new javax.swing.JRadioButton();
        quotationRB = new javax.swing.JRadioButton();
        returnRB = new javax.swing.JRadioButton();
        jLabel1 = new javax.swing.JLabel();
        jLabel2 = new javax.swing.JLabel();
        customerPhNOCB = new javax.swing.JComboBox();
        jScrollPane1 = new javax.swing.JScrollPane();
        customerAddrTA = new javax.swing.JTextArea();
        jLabel3 = new javax.swing.JLabel();
        jPanel1 = new javax.swing.JPanel();
        jLabel4 = new javax.swing.JLabel();
        jButton12 = new javax.swing.JButton();
        jButton13 = new javax.swing.JButton();
        invoiceNoCB = new javax.swing.JComboBox();
        jButton1 = new javax.swing.JButton();
        jButton2 = new javax.swing.JButton();
        addCustomerBT = new javax.swing.JButton();
        jPanel2 = new javax.swing.JPanel();
        jCheckBox1 = new javax.swing.JCheckBox();
        jCheckBox2 = new javax.swing.JCheckBox();
        jCheckBox3 = new javax.swing.JCheckBox();
        jLabel5 = new javax.swing.JLabel();
        Calendar date = Calendar.getInstance();
        invoiceDateDC = new com.toedter.calendar.JDateChooser();
        invoiceRefreshBT = new javax.swing.JButton();
        jComboBox1 = new javax.swing.JComboBox();
        invoiceProductEntryPanel = new javax.swing.JPanel();
        jPanel3 = new javax.swing.JPanel();
        jLabel6 = new javax.swing.JLabel();
        productCodeCB = new javax.swing.JComboBox();
        jButton5 = new javax.swing.JButton();
        jButton6 = new javax.swing.JButton();
        jButton7 = new javax.swing.JButton();
        jPanel4 = new javax.swing.JPanel();
        jLabel7 = new javax.swing.JLabel();
        productNameCB = new javax.swing.JComboBox();
        jPanel8 = new javax.swing.JPanel();
        productColorCB = new javax.swing.JComboBox();
        jLabel11 = new javax.swing.JLabel();
        jPanel5 = new javax.swing.JPanel();
        productUnitCB = new javax.swing.JComboBox();
        jLabel8 = new javax.swing.JLabel();
        jPanel6 = new javax.swing.JPanel();
        jLabel9 = new javax.swing.JLabel();
        productQtyTF = new javax.swing.JTextField();
        jPanel10 = new javax.swing.JPanel();
        productMRPTF = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jPanel7 = new javax.swing.JPanel();
        jLabel10 = new javax.swing.JLabel();
        productDiscountTF = new javax.swing.JTextField();
        jPanel9 = new javax.swing.JPanel();
        jLabel12 = new javax.swing.JLabel();
        productVATTF = new javax.swing.JTextField();
        okBT = new javax.swing.JButton();
        invoiceBillPanel = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        invoiceProductTbl = new javax.swing.JTable();
        invoiceProductDeleteAllBT = new javax.swing.JButton();
        invoiceProductDeleteBT = new javax.swing.JButton();
        jButton10 = new javax.swing.JButton();
        jButton4 = new javax.swing.JButton();
        jPanel11 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        invoiceTotalPriceTF = new javax.swing.JTextField();
        jLabel15 = new javax.swing.JLabel();
        invoiceTaxTotalTF = new javax.swing.JTextField();
        jLabel16 = new javax.swing.JLabel();
        invoiceTotalFinalPriceTF = new javax.swing.JTextField();
        jLabel17 = new javax.swing.JLabel();
        invoiceAmountPaidTF = new javax.swing.JTextField();
        jLabel18 = new javax.swing.JLabel();
        invoiceBalanceTF = new javax.swing.JTextField();
        menuBar = new javax.swing.JMenuBar();
        javax.swing.JMenu entryMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem exitMenuItem = new javax.swing.JMenuItem();
        newEditMenu = new javax.swing.JMenu();
        jMenuItem1 = new javax.swing.JMenuItem();
        jMenuItem2 = new javax.swing.JMenuItem();
        jMenuItem3 = new javax.swing.JMenuItem();
        reportsMenu = new javax.swing.JMenu();
        bankingMenu = new javax.swing.JMenu();
        controlPanelMenu = new javax.swing.JMenu();
        javax.swing.JMenu helpMenu = new javax.swing.JMenu();
        javax.swing.JMenuItem aboutMenuItem = new javax.swing.JMenuItem();
        statusPanel = new javax.swing.JPanel();
        javax.swing.JSeparator statusPanelSeparator = new javax.swing.JSeparator();
        statusMessageLabel = new javax.swing.JLabel();
        statusAnimationLabel = new javax.swing.JLabel();
        progressBar = new javax.swing.JProgressBar();
        invoicePrintPreview = new javax.swing.JDialog();
        jPanel12 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTextArea1 = new javax.swing.JTextArea();
        jButton3 = new javax.swing.JButton();
        jButton8 = new javax.swing.JButton();
        jCheckBox4 = new javax.swing.JCheckBox();
        jScrollPane4 = new javax.swing.JScrollPane();
        jTextArea2 = new javax.swing.JTextArea();
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(svp.SVPApp.class).getContext().getResourceMap(SVPView.class);
        SVPPUEntityManager = java.beans.Beans.isDesignTime() ? null : javax.persistence.Persistence.createEntityManagerFactory(resourceMap.getString("SVPPUEntityManager.persistenceUnit")).createEntityManager(); // NOI18N
        customerTblQuery = java.beans.Beans.isDesignTime() ? null : SVPPUEntityManager.createQuery("SELECT c.customerTblPK.customerName FROM CustomerTbl c");
        customerTblList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : customerTblQuery.getResultList();
        invoiceTblQuery = java.beans.Beans.isDesignTime() ? null : SVPPUEntityManager.createQuery("SELECT i.invoiceNo FROM InvoiceTbl i");
        invoiceTblList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : invoiceTblQuery.getResultList();
        productTblQuery = java.beans.Beans.isDesignTime() ? null : SVPPUEntityManager.createQuery("SELECT p.productCode FROM ProductTbl p");
        productTblList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : productTblQuery.getResultList();
        customerPhNoTblQuery = java.beans.Beans.isDesignTime() ? null : SVPPUEntityManager.createQuery("SELECT c.customerphoneOff1 FROM CustomerTbl c");
        customerPhNolList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : customerPhNoTblQuery.getResultList();
        productTblNameQuery = java.beans.Beans.isDesignTime() ? null : SVPPUEntityManager.createQuery("SELECT p.productName FROM ProductTbl p");
        productTblNameList = java.beans.Beans.isDesignTime() ? java.util.Collections.emptyList() : productTblNameQuery.getResultList();

        mainPanel.setAutoscrolls(true);
        mainPanel.setMaximumSize(new java.awt.Dimension(32767, 32760));
        mainPanel.setName("mainPanel"); // NOI18N
        mainPanel.setPreferredSize(new java.awt.Dimension(1401, 600));
        mainPanel.addComponentListener(new java.awt.event.ComponentAdapter() {
            public void componentShown(java.awt.event.ComponentEvent evt) {
                mainPanelComponentShown(evt);
            }
        });

        toolbarPanel.setBorder(javax.swing.BorderFactory.createBevelBorder(javax.swing.border.BevelBorder.RAISED));
        toolbarPanel.setName("toolbarPanel"); // NOI18N

        org.jdesktop.layout.GroupLayout toolbarPanelLayout = new org.jdesktop.layout.GroupLayout(toolbarPanel);
        toolbarPanel.setLayout(toolbarPanelLayout);
        toolbarPanelLayout.setHorizontalGroup(
            toolbarPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 1444, Short.MAX_VALUE)
        );
        toolbarPanelLayout.setVerticalGroup(
            toolbarPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 25, Short.MAX_VALUE)
        );

        invoiceDetailPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        invoiceDetailPanel.setName("invoiceDetailPanel"); // NOI18N

        invoiceTypePanel.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("invoiceTypePanel.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("invoiceTypePanel.border.titleFont"))); // NOI18N
        invoiceTypePanel.setName("invoiceTypePanel"); // NOI18N

        cashBillRB.setFont(resourceMap.getFont("cashBillRB.font")); // NOI18N
        cashBillRB.setText(resourceMap.getString("cashBillRB.text")); // NOI18N
        cashBillRB.setName("cashBillRB"); // NOI18N
        cashBillRB.setNextFocusableComponent(creditBillRB);
        cashBillRB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cashBillRBActionPerformed(evt);
            }
        });

        creditBillRB.setFont(resourceMap.getFont("creditBillRB.font")); // NOI18N
        creditBillRB.setText(resourceMap.getString("creditBillRB.text")); // NOI18N
        creditBillRB.setName("creditBillRB"); // NOI18N
        creditBillRB.setNextFocusableComponent(quotationRB);
        creditBillRB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                creditBillRBActionPerformed(evt);
            }
        });

        quotationRB.setFont(resourceMap.getFont("quotationRB.font")); // NOI18N
        quotationRB.setText(resourceMap.getString("quotationRB.text")); // NOI18N
        quotationRB.setName("quotationRB"); // NOI18N
        quotationRB.setNextFocusableComponent(returnRB);
        quotationRB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                quotationRBActionPerformed(evt);
            }
        });

        returnRB.setFont(resourceMap.getFont("returnRB.font")); // NOI18N
        returnRB.setText(resourceMap.getString("returnRB.text")); // NOI18N
        returnRB.setName("returnRB"); // NOI18N
        returnRB.setNextFocusableComponent(jComboBox1);
        returnRB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                returnRBActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout invoiceTypePanelLayout = new org.jdesktop.layout.GroupLayout(invoiceTypePanel);
        invoiceTypePanel.setLayout(invoiceTypePanelLayout);
        invoiceTypePanelLayout.setHorizontalGroup(
            invoiceTypePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceTypePanelLayout.createSequentialGroup()
                .add(cashBillRB)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(creditBillRB)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(quotationRB)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(returnRB)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        invoiceTypePanelLayout.setVerticalGroup(
            invoiceTypePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceTypePanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                .add(cashBillRB)
                .add(creditBillRB)
                .add(quotationRB)
                .add(returnRB))
        );

        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jLabel2.setFont(resourceMap.getFont("jLabel2.font")); // NOI18N
        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        customerPhNOCB.setEditable(true);
        customerPhNOCB.setFont(resourceMap.getFont("customerPhNOCB.font")); // NOI18N
        List customerPhList = SVPPUEntityManager.createNamedQuery("CustomerTbl.MasterPhNo").getResultList();
        Collections.sort(customerPhList);
        customerPhNOCB.setModel(new javax.swing.DefaultComboBoxModel (customerPhList.toArray()));
        new S17NonStrict(customerPhNOCB);
        JTextField customerPhNOTF = (JTextField)customerPhNOCB.getEditor().getEditorComponent();
        customerPhNOTF.setText("");
        customerPhNOCB.setName("customerPhNOCB"); // NOI18N
        customerPhNOCB.setNextFocusableComponent(customerPhNOCB);

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        customerAddrTA.setColumns(20);
        customerAddrTA.setEditable(false);
        customerAddrTA.setLineWrap(true);
        customerAddrTA.setRows(5);
        customerAddrTA.setWrapStyleWord(true);
        customerAddrTA.setAutoscrolls(false);
        customerAddrTA.setName("customerAddrTA"); // NOI18N
        customerAddrTA.setNextFocusableComponent(customerAddrTA);
        jScrollPane1.setViewportView(customerAddrTA);

        jLabel3.setFont(resourceMap.getFont("jLabel3.font")); // NOI18N
        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jPanel1.setBackground(resourceMap.getColor("jPanel1.background")); // NOI18N
        jPanel1.setName("jPanel1"); // NOI18N

        jLabel4.setFont(resourceMap.getFont("jLabel4.font")); // NOI18N
        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jButton12.setIcon(resourceMap.getIcon("jButton12.icon")); // NOI18N
        jButton12.setText(resourceMap.getString("jButton12.text")); // NOI18N
        jButton12.setToolTipText(resourceMap.getString("jButton12.toolTipText")); // NOI18N
        jButton12.setMaximumSize(new java.awt.Dimension(79, 20));
        jButton12.setMinimumSize(new java.awt.Dimension(79, 20));
        jButton12.setName("jButton12"); // NOI18N
        jButton12.setPreferredSize(new java.awt.Dimension(79, 20));

        jButton13.setIcon(resourceMap.getIcon("jButton13.icon")); // NOI18N
        jButton13.setText(resourceMap.getString("jButton13.text")); // NOI18N
        jButton13.setToolTipText(resourceMap.getString("jButton13.toolTipText")); // NOI18N
        jButton13.setMaximumSize(new java.awt.Dimension(79, 20));
        jButton13.setMinimumSize(new java.awt.Dimension(79, 20));
        jButton13.setName("jButton13"); // NOI18N
        jButton13.setPreferredSize(new java.awt.Dimension(79, 20));

        invoiceNoCB.setEditable(true);
        invoiceNoCB.setFont(resourceMap.getFont("invoiceNoCB.font")); // NOI18N
        invoiceNoCB.setEnabled(false);
        invoiceNoCB.setName("invoiceNoCB"); // NOI18N
        invoiceNoCB.setNextFocusableComponent(cashBillRB);

        org.jdesktop.swingbinding.JComboBoxBinding jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, invoiceTblList, invoiceNoCB);
        bindingGroup.addBinding(jComboBoxBinding);

        invoiceNoCB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invoiceNoCBActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel1Layout = new org.jdesktop.layout.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel1Layout.createSequentialGroup()
                .add(jButton12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 25, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(50, 50, 50)
                .add(jLabel4)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 54, Short.MAX_VALUE)
                .add(jButton13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
            .add(invoiceNoCB, 0, 208, Short.MAX_VALUE)
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel1Layout.createSequentialGroup()
                .add(jPanel1Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel1Layout.createSequentialGroup()
                        .addContainerGap()
                        .add(jLabel4))
                    .add(jButton13, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jButton12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceNoCB, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 29, Short.MAX_VALUE))
        );

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setToolTipText(resourceMap.getString("jButton1.toolTipText")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(svp.SVPApp.class).getContext().getActionMap(SVPView.class, this);
        jButton2.setAction(actionMap.get("refreshCustomerNameCB")); // NOI18N
        jButton2.setIcon(resourceMap.getIcon("jButton2.icon")); // NOI18N
        jButton2.setText(resourceMap.getString("jButton2.text")); // NOI18N
        jButton2.setToolTipText(resourceMap.getString("jButton2.toolTipText")); // NOI18N
        jButton2.setName("jButton2"); // NOI18N
        jButton2.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton2ActionPerformed(evt);
            }
        });

        addCustomerBT.setAction(actionMap.get("showCustomerEntryForm")); // NOI18N
        addCustomerBT.setIcon(resourceMap.getIcon("addCustomerBT.icon")); // NOI18N
        addCustomerBT.setText(resourceMap.getString("addCustomerBT.text")); // NOI18N
        addCustomerBT.setToolTipText(resourceMap.getString("addCustomerBT.toolTipText")); // NOI18N
        addCustomerBT.setName("addCustomerBT"); // NOI18N
        addCustomerBT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addCustomerBTActionPerformed(evt);
            }
        });

        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(null, resourceMap.getString("jPanel2.border.title"), javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, resourceMap.getFont("jPanel2.border.titleFont"))); // NOI18N
        jPanel2.setName("jPanel2"); // NOI18N

        jCheckBox1.setFont(resourceMap.getFont("jCheckBox1.font")); // NOI18N
        jCheckBox1.setText(resourceMap.getString("jCheckBox1.text")); // NOI18N
        jCheckBox1.setName("jCheckBox1"); // NOI18N

        jCheckBox2.setFont(resourceMap.getFont("jCheckBox2.font")); // NOI18N
        jCheckBox2.setText(resourceMap.getString("jCheckBox2.text")); // NOI18N
        jCheckBox2.setName("jCheckBox2"); // NOI18N

        jCheckBox3.setFont(resourceMap.getFont("jCheckBox3.font")); // NOI18N
        jCheckBox3.setText(resourceMap.getString("jCheckBox3.text")); // NOI18N
        jCheckBox3.setName("jCheckBox3"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel2Layout = new org.jdesktop.layout.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .add(jCheckBox1)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jCheckBox2)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jCheckBox3)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel2Layout.createSequentialGroup()
                .add(jPanel2Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jCheckBox1)
                    .add(jCheckBox2)
                    .add(jCheckBox3))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jLabel5.setFont(resourceMap.getFont("jLabel5.font")); // NOI18N
        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        invoiceDateDC.setFont(resourceMap.getFont("invoiceDateDC.font")); // NOI18N
        invoiceDateDC.setDate(date.getTime());
        invoiceDateDC.setName("invoiceDateDC"); // NOI18N

        invoiceRefreshBT.setIcon(resourceMap.getIcon("invoiceRefreshBT.icon")); // NOI18N
        invoiceRefreshBT.setText(resourceMap.getString("invoiceRefreshBT.text")); // NOI18N
        invoiceRefreshBT.setToolTipText(resourceMap.getString("invoiceRefreshBT.toolTipText")); // NOI18N
        invoiceRefreshBT.setName("invoiceRefreshBT"); // NOI18N
        invoiceRefreshBT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invoiceRefreshBTActionPerformed(evt);
            }
        });

        jComboBox1.setEditable(true);
        jComboBox1.setFont(resourceMap.getFont("jComboBox1.font")); // NOI18N
        //jComboBox1.setEditable(true);
        //jComboBox1.setSelectedIndex(-1);
        //JTextField field = (JTextField) jComboBox1.getEditor().getEditorComponent();
        //field.setText("");
        //field.addKeyListener(new ComboKeyHandler(jComboBox1));
        List customerNameList = SVPPUEntityManager.createNamedQuery("CustomerTbl.name").getResultList();
        Collections.sort(customerNameList);
        jComboBox1.setModel(new javax.swing.DefaultComboBoxModel (customerNameList.toArray()));
        new S17NonStrict(jComboBox1);
        JTextField field = (JTextField)jComboBox1.getEditor().getEditorComponent();
        field.setText("");
        jComboBox1.setName("jComboBox1"); // NOI18N

        org.jdesktop.layout.GroupLayout invoiceDetailPanelLayout = new org.jdesktop.layout.GroupLayout(invoiceDetailPanel);
        invoiceDetailPanel.setLayout(invoiceDetailPanelLayout);
        invoiceDetailPanelLayout.setHorizontalGroup(
            invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceDetailPanelLayout.createSequentialGroup()
                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(invoiceDetailPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .add(invoiceTypePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                    .add(invoiceDetailPanelLayout.createSequentialGroup()
                        .add(48, 48, 48)
                        .add(jPanel1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 36, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                        .add(invoiceRefreshBT, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 35, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)))
                .add(32, 32, 32)
                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel2)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel3)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, jLabel1))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(jScrollPane1)
                    .add(customerPhNOCB, 0, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .add(jComboBox1, 0, 235, Short.MAX_VALUE))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                    .add(addCustomerBT, 0, 0, Short.MAX_VALUE)
                    .add(jButton2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, Short.MAX_VALUE))
                .add(44, 44, 44)
                .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(18, 18, 18)
                .add(jLabel5)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceDateDC, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 127, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(113, Short.MAX_VALUE))
        );
        invoiceDetailPanelLayout.setVerticalGroup(
            invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceDetailPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, invoiceDetailPanelLayout.createSequentialGroup()
                        .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                            .add(invoiceDetailPanelLayout.createSequentialGroup()
                                .add(27, 27, 27)
                                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING, false)
                                    .add(invoiceRefreshBT, 0, 0, Short.MAX_VALUE)
                                    .add(jButton1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 30, Short.MAX_VALUE)))
                            .add(jPanel1, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(invoiceTypePanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(29, 29, 29))
                    .add(invoiceDetailPanelLayout.createSequentialGroup()
                        .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(jLabel1)
                            .add(jComboBox1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                            .add(customerPhNOCB, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 28, Short.MAX_VALUE)
                            .add(jLabel2))
                        .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                        .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                            .add(jLabel3)
                            .add(invoiceDetailPanelLayout.createSequentialGroup()
                                .add(5, 5, 5)
                                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                                    .add(addCustomerBT)
                                    .add(jScrollPane1, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 54, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))))
                        .addContainerGap())))
            .add(invoiceDetailPanelLayout.createSequentialGroup()
                .add(47, 47, 47)
                .add(jPanel2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(49, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, invoiceDetailPanelLayout.createSequentialGroup()
                .add(25, 25, 25)
                .add(invoiceDetailPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(invoiceDateDC, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 20, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(invoiceDetailPanelLayout.createSequentialGroup()
                        .add(jButton2)
                        .add(12, 12, 12)
                        .add(jLabel5)))
                .add(69, 69, 69))
        );

        invoiceProductEntryPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        invoiceProductEntryPanel.setName("invoiceProductEntryPanel"); // NOI18N

        jPanel3.setBackground(resourceMap.getColor("jPanel3.background")); // NOI18N
        jPanel3.setName("jPanel3"); // NOI18N

        jLabel6.setFont(resourceMap.getFont("jLabel6.font")); // NOI18N
        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        productCodeCB.setEditable(true);
        productCodeCB.setFont(resourceMap.getFont("productCodeCB.font")); // NOI18N
        productCodeCB.setName("productCodeCB"); // NOI18N

        org.jdesktop.beansbinding.ELProperty eLProperty = org.jdesktop.beansbinding.ELProperty.create("${resultList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, productTblQuery, eLProperty, productCodeCB);
        bindingGroup.addBinding(jComboBoxBinding);

        productCodeCB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                productCodeCBActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout jPanel3Layout = new org.jdesktop.layout.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .add(24, 24, 24)
                .add(jLabel6)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .add(productCodeCB, 0, 118, Short.MAX_VALUE)
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel3Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel6)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productCodeCB, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE))
        );

        jButton5.setIcon(resourceMap.getIcon("jButton5.icon")); // NOI18N
        jButton5.setText(resourceMap.getString("jButton5.text")); // NOI18N
        jButton5.setToolTipText(resourceMap.getString("jButton5.toolTipText")); // NOI18N
        jButton5.setName("jButton5"); // NOI18N

        jButton6.setAction(actionMap.get("showProductEntryForm")); // NOI18N
        jButton6.setIcon(resourceMap.getIcon("jButton6.icon")); // NOI18N
        jButton6.setText(resourceMap.getString("jButton6.text")); // NOI18N
        jButton6.setToolTipText(resourceMap.getString("jButton6.toolTipText")); // NOI18N
        jButton6.setName("jButton6"); // NOI18N

        jButton7.setIcon(resourceMap.getIcon("jButton7.icon")); // NOI18N
        jButton7.setText(resourceMap.getString("jButton7.text")); // NOI18N
        jButton7.setToolTipText(resourceMap.getString("jButton7.toolTipText")); // NOI18N
        jButton7.setName("jButton7"); // NOI18N

        jPanel4.setBackground(resourceMap.getColor("jPanel4.background")); // NOI18N
        jPanel4.setName("jPanel4"); // NOI18N

        jLabel7.setFont(resourceMap.getFont("jLabel7.font")); // NOI18N
        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        productNameCB.setEditable(true);
        productNameCB.setFont(resourceMap.getFont("productNameCB.font")); // NOI18N
        productNameCB.setName("productNameCB"); // NOI18N

        eLProperty = org.jdesktop.beansbinding.ELProperty.create("${resultList}");
        jComboBoxBinding = org.jdesktop.swingbinding.SwingBindings.createJComboBoxBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, productTblNameQuery, eLProperty, productNameCB);
        bindingGroup.addBinding(jComboBoxBinding);

        org.jdesktop.layout.GroupLayout jPanel4Layout = new org.jdesktop.layout.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel4Layout.createSequentialGroup()
                .add(87, 87, 87)
                .add(jLabel7)
                .addContainerGap(107, Short.MAX_VALUE))
            .add(productNameCB, 0, 280, Short.MAX_VALUE)
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel7)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productNameCB, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        jPanel8.setBackground(resourceMap.getColor("jPanel8.background")); // NOI18N
        jPanel8.setName("jPanel8"); // NOI18N

        productColorCB.setEditable(true);
        productColorCB.setFont(resourceMap.getFont("productColorCB.font")); // NOI18N
        productColorCB.setAutoscrolls(true);
        productColorCB.setName("productColorCB"); // NOI18N
        productColorCB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                productColorCBActionPerformed(evt);
            }
        });

        jLabel11.setFont(resourceMap.getFont("jLabel11.font")); // NOI18N
        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel8Layout = new org.jdesktop.layout.GroupLayout(jPanel8);
        jPanel8.setLayout(jPanel8Layout);
        jPanel8Layout.setHorizontalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(productColorCB, 0, 141, Short.MAX_VALUE)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(51, Short.MAX_VALUE)
                .add(jLabel11)
                .add(50, 50, 50))
        );
        jPanel8Layout.setVerticalGroup(
            jPanel8Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel8Layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jLabel11)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productColorCB, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        jPanel5.setBackground(resourceMap.getColor("jPanel5.background")); // NOI18N
        jPanel5.setName("jPanel5"); // NOI18N

        productUnitCB.setEditable(true);
        productUnitCB.setFont(resourceMap.getFont("productUnitCB.font")); // NOI18N
        productUnitCB.setName("productUnitCB"); // NOI18N
        productUnitCB.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                productUnitCBActionPerformed(evt);
            }
        });

        jLabel8.setFont(resourceMap.getFont("jLabel8.font")); // NOI18N
        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel5Layout = new org.jdesktop.layout.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, productUnitCB, 0, 118, Short.MAX_VALUE)
            .add(jPanel5Layout.createSequentialGroup()
                .add(44, 44, 44)
                .add(jLabel8)
                .addContainerGap(49, Short.MAX_VALUE))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jLabel8)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productUnitCB, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        jPanel6.setBackground(resourceMap.getColor("jPanel6.background")); // NOI18N
        jPanel6.setName("jPanel6"); // NOI18N

        jLabel9.setFont(resourceMap.getFont("jLabel9.font")); // NOI18N
        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        productQtyTF.setFont(resourceMap.getFont("productQtyTF.font")); // NOI18N
        productQtyTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        productQtyTF.setText(resourceMap.getString("productQtyTF.text")); // NOI18N
        productQtyTF.setName("productQtyTF"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel6Layout = new org.jdesktop.layout.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel6Layout.createSequentialGroup()
                .add(31, 31, 31)
                .add(jLabel9)
                .addContainerGap(33, Short.MAX_VALUE))
            .add(productQtyTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 86, Short.MAX_VALUE)
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel6Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel9)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productQtyTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE))
        );

        jPanel10.setBackground(resourceMap.getColor("jPanel10.background")); // NOI18N
        jPanel10.setName("jPanel10"); // NOI18N

        productMRPTF.setFont(resourceMap.getFont("productMRPTF.font")); // NOI18N
        productMRPTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        productMRPTF.setText(resourceMap.getString("productMRPTF.text")); // NOI18N
        productMRPTF.setName("productMRPTF"); // NOI18N

        jLabel13.setFont(resourceMap.getFont("jLabel13.font")); // NOI18N
        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel10Layout = new org.jdesktop.layout.GroupLayout(jPanel10);
        jPanel10.setLayout(jPanel10Layout);
        jPanel10Layout.setHorizontalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, productMRPTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 97, Short.MAX_VALUE)
            .add(jPanel10Layout.createSequentialGroup()
                .add(18, 18, 18)
                .add(jLabel13, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 69, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel10Layout.setVerticalGroup(
            jPanel10Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel10Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel13)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(productMRPTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        jPanel7.setBackground(resourceMap.getColor("jPanel7.background")); // NOI18N
        jPanel7.setName("jPanel7"); // NOI18N

        jLabel10.setFont(resourceMap.getFont("jLabel10.font")); // NOI18N
        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        productDiscountTF.setFont(resourceMap.getFont("productDiscountTF.font")); // NOI18N
        productDiscountTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        productDiscountTF.setText(resourceMap.getString("productDiscountTF.text")); // NOI18N
        productDiscountTF.setName("productDiscountTF"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel7Layout = new org.jdesktop.layout.GroupLayout(jPanel7);
        jPanel7.setLayout(jPanel7Layout);
        jPanel7Layout.setHorizontalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, productDiscountTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 92, Short.MAX_VALUE)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel7Layout.createSequentialGroup()
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .add(jLabel10)
                .addContainerGap())
        );
        jPanel7Layout.setVerticalGroup(
            jPanel7Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel7Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel10)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productDiscountTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        jPanel9.setBackground(resourceMap.getColor("jPanel9.background")); // NOI18N
        jPanel9.setName("jPanel9"); // NOI18N

        jLabel12.setFont(resourceMap.getFont("jLabel12.font")); // NOI18N
        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        productVATTF.setFont(resourceMap.getFont("productVATTF.font")); // NOI18N
        productVATTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        productVATTF.setText(resourceMap.getString("productVATTF.text")); // NOI18N
        productVATTF.setName("productVATTF"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel9Layout = new org.jdesktop.layout.GroupLayout(jPanel9);
        jPanel9.setLayout(jPanel9Layout);
        jPanel9Layout.setHorizontalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(productVATTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 79, Short.MAX_VALUE)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel9Layout.createSequentialGroup()
                .addContainerGap(21, Short.MAX_VALUE)
                .add(jLabel12)
                .add(20, 20, 20))
        );
        jPanel9Layout.setVerticalGroup(
            jPanel9Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel9Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel12)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(productVATTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 39, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        okBT.setFont(resourceMap.getFont("okBT.font")); // NOI18N
        okBT.setText(resourceMap.getString("okBT.text")); // NOI18N
        okBT.setName("okBT"); // NOI18N
        okBT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                okBTActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout invoiceProductEntryPanelLayout = new org.jdesktop.layout.GroupLayout(invoiceProductEntryPanel);
        invoiceProductEntryPanel.setLayout(invoiceProductEntryPanelLayout);
        invoiceProductEntryPanelLayout.setHorizontalGroup(
            invoiceProductEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceProductEntryPanelLayout.createSequentialGroup()
                .add(39, 39, 39)
                .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jPanel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(26, 26, 26)
                .add(okBT)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 47, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 45, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 44, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(103, Short.MAX_VALUE))
        );
        invoiceProductEntryPanelLayout.setVerticalGroup(
            invoiceProductEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceProductEntryPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(invoiceProductEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(jPanel4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel8, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel5, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel6, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel7, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 71, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel9, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, invoiceProductEntryPanelLayout.createSequentialGroup()
                .addContainerGap(30, Short.MAX_VALUE)
                .add(invoiceProductEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, okBT, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 41, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.TRAILING, invoiceProductEntryPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                        .add(jButton7, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jButton6, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .add(org.jdesktop.layout.GroupLayout.LEADING, jButton5, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 40, Short.MAX_VALUE)))
                .add(22, 22, 22))
        );

        invoiceBillPanel.setBackground(resourceMap.getColor("invoiceBillPanel.background")); // NOI18N
        invoiceBillPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        invoiceBillPanel.setName("invoiceBillPanel"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        invoiceProductTbl.setAutoCreateRowSorter(true);
        invoiceProductTbl.setFont(resourceMap.getFont("invoiceProductTbl.font")); // NOI18N
        invoiceProductTbl.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {

            },
            new String [] {
                "S.No", "Product Code", "Company Name", "Product Name", "Units", "Qty", "MRP", "Discount%", "Price", "VAT%", "Final Price"
            }
        ) {
            Class[] types = new Class [] {
                java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
            };
            boolean[] canEdit = new boolean [] {
                false, false, false, false, false, false, false, false, false, false, false
            };

            public Class getColumnClass(int columnIndex) {
                return types [columnIndex];
            }

            public boolean isCellEditable(int rowIndex, int columnIndex) {
                return canEdit [columnIndex];
            }
        });
        invoiceProductTbl.setToolTipText(resourceMap.getString("invoiceProductTbl.toolTipText")); // NOI18N
        invoiceProductTbl.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
        invoiceProductTbl.setName("invoiceProductTbl"); // NOI18N
        invoiceProductTbl.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mousePressed(java.awt.event.MouseEvent evt) {
                invoiceProductTblMousePressed(evt);
            }
        });
        invoiceProductTbl.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                invoiceProductTblKeyPressed(evt);
            }
        });
        jScrollPane2.setViewportView(invoiceProductTbl);

        invoiceProductDeleteAllBT.setIcon(resourceMap.getIcon("invoiceProductDeleteAllBT.icon")); // NOI18N
        invoiceProductDeleteAllBT.setText(resourceMap.getString("invoiceProductDeleteAllBT.text")); // NOI18N
        invoiceProductDeleteAllBT.setToolTipText(resourceMap.getString("invoiceProductDeleteAllBT.toolTipText")); // NOI18N
        invoiceProductDeleteAllBT.setName("invoiceProductDeleteAllBT"); // NOI18N
        invoiceProductDeleteAllBT.setPreferredSize(new java.awt.Dimension(57, 33));
        invoiceProductDeleteAllBT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invoiceProductDeleteAllBTActionPerformed(evt);
            }
        });

        invoiceProductDeleteBT.setIcon(resourceMap.getIcon("invoiceProductDeleteBT.icon")); // NOI18N
        invoiceProductDeleteBT.setText(resourceMap.getString("invoiceProductDeleteBT.text")); // NOI18N
        invoiceProductDeleteBT.setToolTipText(resourceMap.getString("invoiceProductDeleteBT.toolTipText")); // NOI18N
        invoiceProductDeleteBT.setName("invoiceProductDeleteBT"); // NOI18N
        invoiceProductDeleteBT.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invoiceProductDeleteBTActionPerformed(evt);
            }
        });

        jButton10.setIcon(resourceMap.getIcon("jButton10.icon")); // NOI18N
        jButton10.setText(resourceMap.getString("jButton10.text")); // NOI18N
        jButton10.setToolTipText(resourceMap.getString("jButton10.toolTipText")); // NOI18N
        jButton10.setName("jButton10"); // NOI18N
        jButton10.setPreferredSize(new java.awt.Dimension(57, 33));
        jButton10.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton10ActionPerformed(evt);
            }
        });

        org.jdesktop.layout.GroupLayout invoiceBillPanelLayout = new org.jdesktop.layout.GroupLayout(invoiceBillPanel);
        invoiceBillPanel.setLayout(invoiceBillPanelLayout);
        invoiceBillPanelLayout.setHorizontalGroup(
            invoiceBillPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceBillPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 1145, Short.MAX_VALUE)
                .add(10, 10, 10)
                .add(invoiceProductDeleteBT, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 28, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceProductDeleteAllBT, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 29, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton10, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 27, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(163, 163, 163))
        );
        invoiceBillPanelLayout.setVerticalGroup(
            invoiceBillPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(invoiceBillPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(invoiceBillPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING, false)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, invoiceProductDeleteBT, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 22, Short.MAX_VALUE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, invoiceProductDeleteAllBT, 0, 0, Short.MAX_VALUE)
                    .add(jButton10, 0, 0, Short.MAX_VALUE))
                .addContainerGap(265, Short.MAX_VALUE))
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jScrollPane2, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 298, Short.MAX_VALUE)
        );

        jButton4.setIcon(resourceMap.getIcon("jButton4.icon")); // NOI18N
        jButton4.setText(resourceMap.getString("jButton4.text")); // NOI18N
        jButton4.setToolTipText(resourceMap.getString("jButton4.toolTipText")); // NOI18N
        jButton4.setName("jButton4"); // NOI18N

        jPanel11.setBackground(resourceMap.getColor("jPanel11.background")); // NOI18N
        jPanel11.setForeground(resourceMap.getColor("jPanel11.foreground")); // NOI18N
        jPanel11.setName("jPanel11"); // NOI18N

        jLabel14.setFont(resourceMap.getFont("jLabel14.font")); // NOI18N
        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        invoiceTotalPriceTF.setBackground(resourceMap.getColor("invoiceTotalPriceTF.background")); // NOI18N
        invoiceTotalPriceTF.setEditable(false);
        invoiceTotalPriceTF.setFont(resourceMap.getFont("invoiceTotalPriceTF.font")); // NOI18N
        invoiceTotalPriceTF.setForeground(resourceMap.getColor("invoiceTotalPriceTF.foreground")); // NOI18N
        invoiceTotalPriceTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        invoiceTotalPriceTF.setText(resourceMap.getString("invoiceTotalPriceTF.text")); // NOI18N
        invoiceTotalPriceTF.setDisabledTextColor(resourceMap.getColor("invoiceTotalPriceTF.disabledTextColor")); // NOI18N
        invoiceTotalPriceTF.setName("invoiceTotalPriceTF"); // NOI18N

        jLabel15.setFont(resourceMap.getFont("jLabel15.font")); // NOI18N
        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        invoiceTaxTotalTF.setBackground(resourceMap.getColor("invoiceTaxTotalTF.background")); // NOI18N
        invoiceTaxTotalTF.setEditable(false);
        invoiceTaxTotalTF.setFont(resourceMap.getFont("invoiceTaxTotalTF.font")); // NOI18N
        invoiceTaxTotalTF.setForeground(resourceMap.getColor("invoiceTaxTotalTF.foreground")); // NOI18N
        invoiceTaxTotalTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        invoiceTaxTotalTF.setText(resourceMap.getString("invoiceTaxTotalTF.text")); // NOI18N
        invoiceTaxTotalTF.setName("invoiceTaxTotalTF"); // NOI18N

        jLabel16.setFont(resourceMap.getFont("jLabel16.font")); // NOI18N
        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        invoiceTotalFinalPriceTF.setBackground(resourceMap.getColor("invoiceTotalFinalPriceTF.background")); // NOI18N
        invoiceTotalFinalPriceTF.setEditable(false);
        invoiceTotalFinalPriceTF.setFont(resourceMap.getFont("invoiceTotalFinalPriceTF.font")); // NOI18N
        invoiceTotalFinalPriceTF.setForeground(resourceMap.getColor("invoiceTotalFinalPriceTF.foreground")); // NOI18N
        invoiceTotalFinalPriceTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        invoiceTotalFinalPriceTF.setText(resourceMap.getString("invoiceTotalFinalPriceTF.text")); // NOI18N
        invoiceTotalFinalPriceTF.setName("invoiceTotalFinalPriceTF"); // NOI18N
        invoiceTotalFinalPriceTF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invoiceTotalFinalPriceTFActionPerformed(evt);
            }
        });

        jLabel17.setFont(resourceMap.getFont("jLabel17.font")); // NOI18N
        jLabel17.setText(resourceMap.getString("jLabel17.text")); // NOI18N
        jLabel17.setName("jLabel17"); // NOI18N

        invoiceAmountPaidTF.setBackground(resourceMap.getColor("invoiceAmountPaidTF.background")); // NOI18N
        invoiceAmountPaidTF.setFont(resourceMap.getFont("invoiceAmountPaidTF.font")); // NOI18N
        invoiceAmountPaidTF.setForeground(resourceMap.getColor("invoiceAmountPaidTF.foreground")); // NOI18N
        invoiceAmountPaidTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        invoiceAmountPaidTF.setText(resourceMap.getString("invoiceAmountPaidTF.text")); // NOI18N
        invoiceAmountPaidTF.setBorder(javax.swing.BorderFactory.createLineBorder(resourceMap.getColor("invoiceAmountPaidTF.border.lineColor"))); // NOI18N
        invoiceAmountPaidTF.setName("invoiceAmountPaidTF"); // NOI18N
        invoiceAmountPaidTF.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                invoiceAmountPaidTFActionPerformed(evt);
            }
        });
        invoiceAmountPaidTF.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusLost(java.awt.event.FocusEvent evt) {
                invoiceAmountPaidTFFocusLost(evt);
            }
        });
        invoiceAmountPaidTF.addKeyListener(new java.awt.event.KeyAdapter() {
            public void keyPressed(java.awt.event.KeyEvent evt) {
                invoiceAmountPaidTFKeyPressed(evt);
            }
            public void keyReleased(java.awt.event.KeyEvent evt) {
                invoiceAmountPaidTFKeyReleased(evt);
            }
        });

        jLabel18.setFont(resourceMap.getFont("jLabel18.font")); // NOI18N
        jLabel18.setText(resourceMap.getString("jLabel18.text")); // NOI18N
        jLabel18.setName("jLabel18"); // NOI18N

        invoiceBalanceTF.setBackground(resourceMap.getColor("invoiceBalanceTF.background")); // NOI18N
        invoiceBalanceTF.setEditable(false);
        invoiceBalanceTF.setFont(resourceMap.getFont("invoiceBalanceTF.font")); // NOI18N
        invoiceBalanceTF.setForeground(resourceMap.getColor("invoiceBalanceTF.foreground")); // NOI18N
        invoiceBalanceTF.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        invoiceBalanceTF.setText(resourceMap.getString("invoiceBalanceTF.text")); // NOI18N
        invoiceBalanceTF.setName("invoiceBalanceTF"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel11Layout = new org.jdesktop.layout.GroupLayout(jPanel11);
        jPanel11.setLayout(jPanel11Layout);
        jPanel11Layout.setHorizontalGroup(
            jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .add(jLabel14)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceTotalPriceTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 112, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(18, 18, 18)
                .add(jLabel15)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceTaxTotalTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 117, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel16)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceTotalFinalPriceTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 123, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel17)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceAmountPaidTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 109, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jLabel18)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceBalanceTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 118, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        jPanel11Layout.setVerticalGroup(
            jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, jPanel11Layout.createSequentialGroup()
                .addContainerGap()
                .add(jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, invoiceBalanceTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 32, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(invoiceAmountPaidTF, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 31, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                        .add(jLabel18))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(invoiceTotalFinalPriceTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
                        .add(jLabel17))
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jPanel11Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(invoiceTaxTotalTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
                        .add(jLabel16)
                        .add(invoiceTotalPriceTF, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 31, Short.MAX_VALUE)
                        .add(jLabel15)
                        .add(jLabel14)))
                .addContainerGap())
        );

        org.jdesktop.layout.GroupLayout mainPanelLayout = new org.jdesktop.layout.GroupLayout(mainPanel);
        mainPanel.setLayout(mainPanelLayout);
        mainPanelLayout.setHorizontalGroup(
            mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, mainPanelLayout.createSequentialGroup()
                .addContainerGap(155, Short.MAX_VALUE)
                .add(jPanel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(92, 92, 92)
                .add(jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 108, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(101, 101, 101))
            .add(toolbarPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(mainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(invoiceDetailPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .add(mainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(invoiceProductEntryPanel, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
            .add(mainPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(invoiceBillPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        mainPanelLayout.setVerticalGroup(
            mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(mainPanelLayout.createSequentialGroup()
                .add(toolbarPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceDetailPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 152, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceProductEntryPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(invoiceBillPanel, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(mainPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.TRAILING)
                    .add(org.jdesktop.layout.GroupLayout.LEADING, jButton4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 50, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                    .add(jPanel11, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        menuBar.setName("menuBar"); // NOI18N

        entryMenu.setText(resourceMap.getString("entryMenu.text")); // NOI18N
        entryMenu.setName("entryMenu"); // NOI18N

        exitMenuItem.setAction(actionMap.get("quit")); // NOI18N
        exitMenuItem.setIcon(resourceMap.getIcon("exitMenuItem.icon")); // NOI18N
        exitMenuItem.setName("exitMenuItem"); // NOI18N
        entryMenu.add(exitMenuItem);

        menuBar.add(entryMenu);

        newEditMenu.setText(resourceMap.getString("newEditMenu.text")); // NOI18N
        newEditMenu.setName("newEditMenu"); // NOI18N

        jMenuItem1.setAction(actionMap.get("showCustomerEntryForm")); // NOI18N
        jMenuItem1.setIcon(resourceMap.getIcon("jMenuItem1.icon")); // NOI18N
        jMenuItem1.setText(resourceMap.getString("jMenuItem1.text")); // NOI18N
        jMenuItem1.setName("jMenuItem1"); // NOI18N
        newEditMenu.add(jMenuItem1);

        jMenuItem2.setAction(actionMap.get("showProductEntryForm")); // NOI18N
        jMenuItem2.setIcon(resourceMap.getIcon("jMenuItem2.icon")); // NOI18N
        jMenuItem2.setText(resourceMap.getString("jMenuItem2.text")); // NOI18N
        jMenuItem2.setName("jMenuItem2"); // NOI18N
        newEditMenu.add(jMenuItem2);

        jMenuItem3.setAction(actionMap.get("showCompanyEntryForm")); // NOI18N
        jMenuItem3.setIcon(resourceMap.getIcon("jMenuItem3.icon")); // NOI18N
        jMenuItem3.setText(resourceMap.getString("jMenuItem3.text")); // NOI18N
        jMenuItem3.setName("jMenuItem3"); // NOI18N
        newEditMenu.add(jMenuItem3);

        menuBar.add(newEditMenu);

        reportsMenu.setText(resourceMap.getString("reportsMenu.text")); // NOI18N
        reportsMenu.setName("reportsMenu"); // NOI18N
        menuBar.add(reportsMenu);

        bankingMenu.setText(resourceMap.getString("bankingMenu.text")); // NOI18N
        bankingMenu.setName("bankingMenu"); // NOI18N
        menuBar.add(bankingMenu);

        controlPanelMenu.setText(resourceMap.getString("controlPanelMenu.text")); // NOI18N
        controlPanelMenu.setName("controlPanelMenu"); // NOI18N
        menuBar.add(controlPanelMenu);

        helpMenu.setAction(actionMap.get("showAboutBox")); // NOI18N
        helpMenu.setText(resourceMap.getString("helpMenu.text")); // NOI18N
        helpMenu.setName("helpMenu"); // NOI18N

        aboutMenuItem.setAction(actionMap.get("showAboutBox")); // NOI18N
        aboutMenuItem.setText(resourceMap.getString("aboutMenuItem.text")); // NOI18N
        aboutMenuItem.setName("aboutMenuItem"); // NOI18N
        helpMenu.add(aboutMenuItem);

        menuBar.add(helpMenu);

        statusPanel.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        statusPanel.setAutoscrolls(true);
        statusPanel.setMaximumSize(new java.awt.Dimension(1447, 30));
        statusPanel.setName("statusPanel"); // NOI18N
        statusPanel.setPreferredSize(new java.awt.Dimension(15, 30));

        statusPanelSeparator.setName("statusPanelSeparator"); // NOI18N

        statusMessageLabel.setName("statusMessageLabel"); // NOI18N

        statusAnimationLabel.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
        statusAnimationLabel.setName("statusAnimationLabel"); // NOI18N

        progressBar.setName("progressBar"); // NOI18N

        org.jdesktop.layout.GroupLayout statusPanelLayout = new org.jdesktop.layout.GroupLayout(statusPanel);
        statusPanel.setLayout(statusPanelLayout);
        statusPanelLayout.setHorizontalGroup(
            statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(statusPanelLayout.createSequentialGroup()
                .add(1396, 1396, 1396)
                .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 48, Short.MAX_VALUE))
            .add(statusPanelLayout.createSequentialGroup()
                .addContainerGap()
                .add(statusMessageLabel)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 1424, Short.MAX_VALUE)
                .add(statusAnimationLabel)
                .addContainerGap())
            .add(org.jdesktop.layout.GroupLayout.TRAILING, statusPanelLayout.createSequentialGroup()
                .addContainerGap(1258, Short.MAX_VALUE)
                .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 146, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .add(40, 40, 40))
        );
        statusPanelLayout.setVerticalGroup(
            statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(statusPanelLayout.createSequentialGroup()
                .add(statusPanelSeparator, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 2, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
                    .add(progressBar, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 14, Short.MAX_VALUE)
                    .add(statusPanelLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                        .add(statusMessageLabel)
                        .add(statusAnimationLabel)))
                .addContainerGap())
        );

        invoicePrintPreview.setTitle(resourceMap.getString("invoicePrintPreview.title")); // NOI18N
        invoicePrintPreview.setMinimumSize(new java.awt.Dimension(286, 457));
        invoicePrintPreview.setModal(true);
        invoicePrintPreview.setName("invoicePrintPreview"); // NOI18N
        invoicePrintPreview.setResizable(false);

        jPanel12.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel12.setName("jPanel12"); // NOI18N

        org.jdesktop.layout.GroupLayout jPanel12Layout = new org.jdesktop.layout.GroupLayout(jPanel12);
        jPanel12.setLayout(jPanel12Layout);
        jPanel12Layout.setHorizontalGroup(
            jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 282, Short.MAX_VALUE)
        );
        jPanel12Layout.setVerticalGroup(
            jPanel12Layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(0, 19, Short.MAX_VALUE)
        );

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jTextArea1.setColumns(20);
        jTextArea1.setFont(resourceMap.getFont("jTextArea1.font")); // NOI18N
        jTextArea1.setLineWrap(true);
        jTextArea1.setRows(5);
        jTextArea1.setText(resourceMap.getString("jTextArea1.text")); // NOI18N
        jTextArea1.setWrapStyleWord(true);
        jTextArea1.setName("jTextArea1"); // NOI18N
        jScrollPane3.setViewportView(jTextArea1);

        jButton3.setText(resourceMap.getString("jButton3.text")); // NOI18N
        jButton3.setName("jButton3"); // NOI18N
        jButton3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton3ActionPerformed(evt);
            }
        });

        jButton8.setText(resourceMap.getString("jButton8.text")); // NOI18N
        jButton8.setName("jButton8"); // NOI18N

        jCheckBox4.setText(resourceMap.getString("jCheckBox4.text")); // NOI18N
        jCheckBox4.setName("jCheckBox4"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jTextArea2.setColumns(20);
        jTextArea2.setEditable(false);
        jTextArea2.setFont(resourceMap.getFont("jTextArea2.font")); // NOI18N
        jTextArea2.setLineWrap(true);
        jTextArea2.setRows(1);
        jTextArea2.setText(resourceMap.getString("jTextArea2.text")); // NOI18N
        jTextArea2.setWrapStyleWord(true);
        jTextArea2.setName("jTextArea2"); // NOI18N
        jScrollPane4.setViewportView(jTextArea2);

        org.jdesktop.layout.GroupLayout invoicePrintPreviewLayout = new org.jdesktop.layout.GroupLayout(invoicePrintPreview.getContentPane());
        invoicePrintPreview.getContentPane().setLayout(invoicePrintPreviewLayout);
        invoicePrintPreviewLayout.setHorizontalGroup(
            invoicePrintPreviewLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(jPanel12, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
            .add(invoicePrintPreviewLayout.createSequentialGroup()
                .add(jCheckBox4)
                .addContainerGap())
            .add(jScrollPane4, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
            .add(invoicePrintPreviewLayout.createSequentialGroup()
                .add(83, 83, 83)
                .add(jButton3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 59, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jButton8)
                .addContainerGap(73, Short.MAX_VALUE))
            .add(jScrollPane3, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 286, Short.MAX_VALUE)
        );
        invoicePrintPreviewLayout.setVerticalGroup(
            invoicePrintPreviewLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)
            .add(org.jdesktop.layout.GroupLayout.TRAILING, invoicePrintPreviewLayout.createSequentialGroup()
                .add(jScrollPane4, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 26, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)
                .add(jScrollPane3, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, 316, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED, 26, Short.MAX_VALUE)
                .add(invoicePrintPreviewLayout.createParallelGroup(org.jdesktop.layout.GroupLayout.BASELINE)
                    .add(jButton8)
                    .add(jButton3))
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jCheckBox4)
                .addPreferredGap(org.jdesktop.layout.LayoutStyle.UNRELATED)
                .add(jPanel12, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))
        );

        setComponent(mainPanel);
        setMenuBar(menuBar);
        setStatusBar(statusPanel);

        bindingGroup.bind();
    }// </editor-fold>//GEN-END:initComponents

private void cashBillRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cashBillRBActionPerformed
// TODO add your handling code here:
    
   if(cashBillRB.isSelected()){
    creditBillRB.setSelected(false);
    quotationRB.setSelected(false);
    returnRB.setSelected(false);
    invoiceNoCB.removeAllItems();
    invoiceNoCB.setEnabled(false);
    List invoiceNo = SVPPUEntityManager.createNamedQuery("InvoiceTbl.invoiceNo").getResultList();
   for (Object i : invoiceNo.toArray()){
    invoiceNoCB.addItem(Integer.parseInt(i.toString())+ 1); 
  
   }
     
   
  
   }
   else if (cashBillRB.isSelected() == false){
       cashBillRB.setSelected(true); 
    }
}//GEN-LAST:event_cashBillRBActionPerformed

private void creditBillRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_creditBillRBActionPerformed
// TODO add your handling code here:
    if(creditBillRB.isSelected()){
    cashBillRB.setSelected(false);
    quotationRB.setSelected(false);
    returnRB.setSelected(false);
   // SVPView.this.invoiceNoCBRefresh();
    }
    else if (creditBillRB.isSelected() == false){
       creditBillRB.setSelected(true); 
    }
}//GEN-LAST:event_creditBillRBActionPerformed

private void quotationRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_quotationRBActionPerformed
// TODO add your handling code here:
    if(quotationRB.isSelected()){
    creditBillRB.setSelected(false);
    cashBillRB.setSelected(false);
    returnRB.setSelected(false);
   // SVPView.this.invoiceNoCBRefresh();
    }
    else if (quotationRB.isSelected() == false){
       quotationRB.setSelected(true); 
    }
}//GEN-LAST:event_quotationRBActionPerformed

private void returnRBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_returnRBActionPerformed
// TODO add your handling code here:
    
    if(returnRB.isSelected()){
    creditBillRB.setSelected(false);
    cashBillRB.setSelected(false);
    quotationRB.setSelected(false);
    invoiceNoCB.setEnabled(true);
    invoiceNoCB.setEditable(true);
    invoiceNoCB.setModel(new javax.swing.DefaultComboBoxModel (SVPPUEntityManager.createNamedQuery("InvoiceTbl.invoiceNo").getResultList().toArray()));

//        }catch(Exception e){
//           //invoiceNoCB.addItem("1520122");
//           e.printStackTrace();
//         }


 
    }
    else if (returnRB.isSelected() == false){
        returnRB.setSelected(true);
    } 

}//GEN-LAST:event_returnRBActionPerformed

private void invoiceRefreshBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invoiceRefreshBTActionPerformed
// TODO add your handling code here:
    //SVPView.this.invoiceNoCBRefresh();
    creditBillRB.setSelected(false);
    cashBillRB.setSelected(false);
    quotationRB.setSelected(false);
    returnRB.setSelected(false);
}//GEN-LAST:event_invoiceRefreshBTActionPerformed
  
private void addCustomerBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_addCustomerBTActionPerformed
// TODO add your handling code here:
   
  //cef.setVisible(true);
   
}//GEN-LAST:event_addCustomerBTActionPerformed

private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton2ActionPerformed

}//GEN-LAST:event_jButton2ActionPerformed

private void productColorCBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_productColorCBActionPerformed
// TODO add your handling code here:
          
}//GEN-LAST:event_productColorCBActionPerformed

private void productUnitCBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_productUnitCBActionPerformed
// TODO add your handling code here:
     
}//GEN-LAST:event_productUnitCBActionPerformed

private void okBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okBTActionPerformed
 //TODO add your handling code here:
    try{
    DefaultTableModel model = (DefaultTableModel) invoiceProductTbl.getModel() ;
    DecimalFormat df = new DecimalFormat("#.##");
    JTextField field =(JTextField) productCodeCB.getEditor().getEditorComponent();
    JTextField field1 =(JTextField) productNameCB.getEditor().getEditorComponent();
    Integer sno = model.getRowCount()+1;
    String strSno  = sno.toString(); 
    String productCode = field.getText().trim();
    String productCompany = "N/A";
    String productName = field1.getText().trim();
    String productColor = productColorCB.getEditor().getItem().toString();
    String productUnit  = productUnitCB.getEditor().getItem().toString();
    String productQty  = productQtyTF.getText().trim();
    String productMRP = productMRPTF.getText().trim();
    String productDiscount = productDiscountTF.getText().trim();
    Float productPrice = Float.parseFloat(df.format(Float.parseFloat(productMRP) - (Float.parseFloat(productMRP)*Float.parseFloat(productDiscount)/100))) ;
    String productVAT = productVATTF.getText().trim();
    Float productFinalPrice = Float.parseFloat(df.format((productPrice + (productPrice * Float.parseFloat(productVAT)/100)) * Float.parseFloat(productQty)));
    Float totalProductTax = Float.parseFloat(df.format( Float.parseFloat(invoiceTaxTotalTF.getText().trim())+(productPrice * Float.parseFloat(productVAT)/100) * Float.parseFloat(productQty)));
    Float totalProductPrice = Float.parseFloat(df.format( Float.parseFloat(invoiceTotalPriceTF.getText().trim()) + (productPrice * Float.parseFloat(productQty)))); 
    Float totalProductFinalPrice = Float.parseFloat(df.format( Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) + productFinalPrice ));
    Float invoiceBalance = Float.parseFloat(df.format( totalProductFinalPrice  -  Float.parseFloat(invoiceAmountPaidTF.getText().trim())));
    
       productCompany = SVPPUEntityManager.createQuery("SELECT p.productCompanyName FROM ProductTbl p WHERE p.productCode = '" + productCode+"'").getResultList().get(0).toString();
         //SVPPUEntityManager.createNamedQuery("ProductTblCompanyName.findByProductCode");         
    
           
            //productCompany = "ASIAN";
             
       
//
//    }catch(Exception e){
//        e.printStackTrace();
//        statusMessageLabel.setVisible(true);
//        statusMessageLabel.setForeground(Color.red);
//        statusMessageLabel.setText("Status  |  " + e.getMessage());
//       
//     }

    
//model.addRow(new String[]{strSno, productCode});
model.addRow(new String[]{strSno, productCode, productCompany, productName.concat(" - ").concat(productColor), productUnit, productQty,
                          productMRP, productDiscount, productPrice.toString(), productVAT, productFinalPrice.toString()});

invoiceProductTbl.setModel(model);
invoiceTotalPriceTF.setText(totalProductPrice.toString());
invoiceTaxTotalTF.setText(totalProductTax.toString());
invoiceTotalFinalPriceTF.setText(totalProductFinalPrice.toString());
invoiceBalanceTF.setText(invoiceBalance.toString());
}catch(Exception e){
    statusMessageLabel.setVisible(true);
    statusMessageLabel.setForeground(Color.red);
    statusMessageLabel.setText("Status  |  " + e.getMessage());
}   
}//GEN-LAST:event_okBTActionPerformed

private void invoiceProductTblMousePressed(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_invoiceProductTblMousePressed
// TODO add your handling code here:
    
    
}//GEN-LAST:event_invoiceProductTblMousePressed

private void invoiceProductDeleteAllBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invoiceProductDeleteAllBTActionPerformed
// TODO add your handling code here:
  invoiceProductTbl.selectAll();
  invoiceProductDeleteBTActionPerformed(evt);
 // model.
}//GEN-LAST:event_invoiceProductDeleteAllBTActionPerformed

private void invoiceProductDeleteBTActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invoiceProductDeleteBTActionPerformed
// TODO add your handling code here:
     DefaultTableModel model = (DefaultTableModel) invoiceProductTbl.getModel() ;
     System.out.println("saving model : " + model.toString());
     //this.saveTableModel(model);
     DecimalFormat df = new DecimalFormat("#.##");
     int[] rowNo = invoiceProductTbl.getSelectedRows();
     for( int i = rowNo.length; i>0; i--){
         Float productPrice = Float.parseFloat(df.format(Float.parseFloat(model.getValueAt(rowNo[i-1], 8).toString()) * Float.parseFloat(model.getValueAt(rowNo[i-1], 5).toString())));
         Float totalProductPrice = Float.parseFloat(df.format(Float.parseFloat(invoiceTotalPriceTF.getText().trim()) - productPrice));
         Float productTax = Float.parseFloat(df.format(Float.parseFloat(model.getValueAt(rowNo[i-1], 8).toString()) * Float.parseFloat(model.getValueAt(rowNo[i-1], 9).toString())))/100 * Float.parseFloat(model.getValueAt(rowNo[i-1], 5).toString());
         Float totalProductTax  = Float.parseFloat(df.format(Float.parseFloat(invoiceTaxTotalTF.getText().trim()) - Float.parseFloat(df.format(productTax)) ));
         Float totalProductFinalPrice = Float.parseFloat(df.format(Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(model.getValueAt(rowNo[i-1], 10).toString())));
         Float invoiceBalance = Float.parseFloat(df.format( totalProductFinalPrice  -  Float.parseFloat(invoiceAmountPaidTF.getText().trim())));
         invoiceTotalFinalPriceTF.setText(totalProductFinalPrice.toString());
         invoiceTaxTotalTF.setText(totalProductTax.toString());
         invoiceTotalPriceTF.setText(totalProductPrice.toString());
         invoiceBalanceTF.setText(invoiceBalance.toString());
         model.removeRow(rowNo[i-1]);
     }
     model.fireTableDataChanged();
     for(int j=0; j<model.getRowCount();j++){
         model.setValueAt(new String("" +(j+1)), j, 0);
     }
     
       
}//GEN-LAST:event_invoiceProductDeleteBTActionPerformed

private void jButton10ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton10ActionPerformed
// TODO add your handling code here:
    
    invoiceProductTbl.setGridColor(Color.gray);   
    invoiceProductTbl.setShowGrid(true);
    //System.out.println("Retrieving model...");
   // System.out.println("Output from DB : " + SVPPUEntityManager.createQuery("Select c from CustomerTblPK c").getResultList().get(0));
   
 //  new JSearchComboBox(jComboBox1);  
  // jComboBox1.setModel(new javax.swing.DefaultComboBoxModel (SVPPUEntityManager.createNamedQuery("CustomerTbl.name").getResultList().toArray()));
 //   customerPhNOCB.setModel(new javax.swing.DefaultComboBoxModel (SVPPUEntityManager.createNamedQuery("CustomerTbl.MasterPhNo").getResultList().toArray()));
    
    
    
    
    //invoiceProductTbl.
    
//    try{
//        String header = null, footer = null;
//      customerAddrTA.print(null, null, true, null, null, true);
//    }
//    catch(Exception e){
//        e.printStackTrace();
//    }
    

   // invoicePrintPreview.setVisible(true);
    
}//GEN-LAST:event_jButton10ActionPerformed

private void jButton3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton3ActionPerformed
// TODO add your handling code here:
    
        try{
       // MessageFormat header = new CreateFormat(jTextArea2);
        //jTextArea2.print(null, null, true, null, null, true);
      // DocFlavor doc_flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
    // PrintRequestAttributeSet attr_set = new HashPrintRequestAttributeSet();
//        PrintService prt_ser;
//        
//        attr_set.add(MediaSize.Other.INVOICE);
////        //ISO_A4
//        attr_set.add(new Copies(1)); 
//        PrintService service = PrintServiceLookup.lookupDefaultPrintService();
        
       
        
//        
//        PrintJob pj;
//        
//        
//       // jTextArea1.pr 
//        jTextArea1.setText(jTextArea1.getText().trim());
//        jTextArea1.print(new MessageFormat(jTextArea2.getText().trim()), null, true, service, attr_set, true);
       
    }
    catch(Exception e){
        e.printStackTrace();
    }
        
     
}//GEN-LAST:event_jButton3ActionPerformed

private void invoiceProductTblKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_invoiceProductTblKeyPressed
// TODO add your handling code here:
    
    if (evt.getKeyCode() == 127 && invoiceProductTbl.getModel().getRowCount()>0){
       
       DefaultTableModel model = (DefaultTableModel) invoiceProductTbl.getModel() ;
     System.out.println("saving model : " + model.toString());
     //this.saveTableModel(model);
     DecimalFormat df = new DecimalFormat("#.##");
     int[] rowNo = invoiceProductTbl.getSelectedRows();
     for( int i = rowNo.length; i>0; i--){
         Float productPrice = Float.parseFloat(df.format(Float.parseFloat(model.getValueAt(rowNo[i-1], 8).toString()) * Float.parseFloat(model.getValueAt(rowNo[i-1], 5).toString())));
         Float totalProductPrice = Float.parseFloat(df.format(Float.parseFloat(invoiceTotalPriceTF.getText().trim()) - productPrice));
         Float productTax = Float.parseFloat(df.format(Float.parseFloat(model.getValueAt(rowNo[i-1], 8).toString()) * Float.parseFloat(model.getValueAt(rowNo[i-1], 9).toString())))/100 * Float.parseFloat(model.getValueAt(rowNo[i-1], 5).toString());
         Float totalProductTax  = Float.parseFloat(df.format(Float.parseFloat(invoiceTaxTotalTF.getText().trim()) - Float.parseFloat(df.format(productTax)) ));
         Float totalProductFinalPrice = Float.parseFloat(df.format(Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(model.getValueAt(rowNo[i-1], 10).toString())));
         invoiceTotalFinalPriceTF.setText(totalProductFinalPrice.toString());
         invoiceTaxTotalTF.setText(totalProductTax.toString());
         invoiceTotalPriceTF.setText(totalProductPrice.toString());
         model.removeRow(rowNo[i-1]);
     }
     model.fireTableDataChanged();
     for(int j=0; j<model.getRowCount();j++){
         model.setValueAt(new String("" +(j+1)), j, 0);
     }
     
    }
}//GEN-LAST:event_invoiceProductTblKeyPressed

private void invoiceTotalFinalPriceTFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invoiceTotalFinalPriceTFActionPerformed
// TODO add your handling code here:
    
}//GEN-LAST:event_invoiceTotalFinalPriceTFActionPerformed

private void invoiceAmountPaidTFActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invoiceAmountPaidTFActionPerformed
// TODO add your handling code here:
        try{
        DecimalFormat df = new DecimalFormat("#.00");
        Float invoiceBalance = Float.parseFloat(df.format((Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(invoiceAmountPaidTF.getText().trim()))));
        invoiceBalanceTF.setText(invoiceBalance.toString());
        }catch(Exception e){
            invoiceAmountPaidTF.setText("0.00");
        }
}//GEN-LAST:event_invoiceAmountPaidTFActionPerformed

private void invoiceAmountPaidTFFocusLost(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_invoiceAmountPaidTFFocusLost
// TODO add your handling code here:
    DecimalFormat df = new DecimalFormat("#.00");
    Float invoiceBalance;
    if (invoiceAmountPaidTF.getText().isEmpty() == true){
        invoiceAmountPaidTF.setText("0.00");
        invoiceBalance = Float.parseFloat(df.format((Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(invoiceAmountPaidTF.getText().trim()))));
        invoiceBalanceTF.setText(invoiceBalance.toString());
    }else{
        try{
        
        invoiceBalance = Float.parseFloat(df.format((Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(invoiceAmountPaidTF.getText().trim()))));
        invoiceBalanceTF.setText(invoiceBalance.toString());
        }catch(Exception e){
           // invoiceAmountPaidTF.setText("0.00");
        }
    }
}//GEN-LAST:event_invoiceAmountPaidTFFocusLost

private void invoiceAmountPaidTFKeyPressed(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_invoiceAmountPaidTFKeyPressed
// TODO add your handling code here:
    try{
        DecimalFormat df = new DecimalFormat("#.00");
        Float invoiceBalance = Float.parseFloat(df.format((Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(invoiceAmountPaidTF.getText().trim()))));
        invoiceBalanceTF.setText(invoiceBalance.toString());
        }catch(Exception e){
           // invoiceAmountPaidTF.setText("0.00");
        }
}//GEN-LAST:event_invoiceAmountPaidTFKeyPressed

private void invoiceAmountPaidTFKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_invoiceAmountPaidTFKeyReleased
// TODO add your handling code here:
    try{
        DecimalFormat df = new DecimalFormat("#.00");
        Float invoiceBalance = Float.parseFloat(df.format((Float.parseFloat(invoiceTotalFinalPriceTF.getText().trim()) - Float.parseFloat(invoiceAmountPaidTF.getText().trim()))));
        invoiceBalanceTF.setText(invoiceBalance.toString());
        }catch(Exception e){
           // invoiceAmountPaidTF.setText("0.00");
        }
}//GEN-LAST:event_invoiceAmountPaidTFKeyReleased

    private void mainPanelComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_mainPanelComponentShown

        
    }//GEN-LAST:event_mainPanelComponentShown

    private void invoiceNoCBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_invoiceNoCBActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_invoiceNoCBActionPerformed

    private void productCodeCBActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_productCodeCBActionPerformed
        // TODO add your handling code here:
        try{
        String productCode = productCodeCB.getEditor().getItem().toString().trim();
        System.out.println("product Code : " + productCode ); 
        productColorCB.setModel(new javax.swing.DefaultComboBoxModel ( SVPPUEntityManager.createQuery("SELECT p.productColor FROM ProductColorTbl p WHERE p.productCode = '" + productCode+"'").getResultList().toArray()));
        
        }catch(Exception e){
           System.out.println("product not availabele"); 
        }
    }//GEN-LAST:event_productCodeCBActionPerformed

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.persistence.EntityManager SVPPUEntityManager;
    private javax.swing.JButton addCustomerBT;
    private javax.swing.JMenu bankingMenu;
    private javax.swing.JRadioButton cashBillRB;
    private javax.swing.JMenu controlPanelMenu;
    private javax.swing.JRadioButton creditBillRB;
    private javax.swing.JTextArea customerAddrTA;
    private javax.swing.JComboBox customerPhNOCB;
    private javax.persistence.Query customerPhNoTblQuery;
    private java.util.List<svp.CustomerTbl> customerPhNolList;
    private java.util.List<svp.CustomerTbl> customerTblList;
    private javax.persistence.Query customerTblQuery;
    private javax.swing.JTextField invoiceAmountPaidTF;
    private javax.swing.JTextField invoiceBalanceTF;
    private javax.swing.JPanel invoiceBillPanel;
    private com.toedter.calendar.JDateChooser invoiceDateDC;
    private javax.swing.JPanel invoiceDetailPanel;
    private javax.swing.JComboBox invoiceNoCB;
    private javax.swing.JDialog invoicePrintPreview;
    private javax.swing.JButton invoiceProductDeleteAllBT;
    private javax.swing.JButton invoiceProductDeleteBT;
    private javax.swing.JPanel invoiceProductEntryPanel;
    private static javax.swing.JTable invoiceProductTbl;
    private javax.swing.JButton invoiceRefreshBT;
    private javax.swing.JTextField invoiceTaxTotalTF;
    private java.util.List<svp.InvoiceTbl> invoiceTblList;
    private javax.persistence.Query invoiceTblQuery;
    private javax.swing.JTextField invoiceTotalFinalPriceTF;
    private javax.swing.JTextField invoiceTotalPriceTF;
    private javax.swing.JPanel invoiceTypePanel;
    private javax.swing.JButton jButton1;
    private javax.swing.JButton jButton10;
    private javax.swing.JButton jButton12;
    private javax.swing.JButton jButton13;
    private javax.swing.JButton jButton2;
    private javax.swing.JButton jButton3;
    private javax.swing.JButton jButton4;
    private javax.swing.JButton jButton5;
    private javax.swing.JButton jButton6;
    private javax.swing.JButton jButton7;
    private javax.swing.JButton jButton8;
    private javax.swing.JCheckBox jCheckBox1;
    private javax.swing.JCheckBox jCheckBox2;
    private javax.swing.JCheckBox jCheckBox3;
    private javax.swing.JCheckBox jCheckBox4;
    private javax.swing.JComboBox jComboBox1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel17;
    private javax.swing.JLabel jLabel18;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenuItem jMenuItem1;
    private javax.swing.JMenuItem jMenuItem2;
    private javax.swing.JMenuItem jMenuItem3;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel10;
    private javax.swing.JPanel jPanel11;
    private javax.swing.JPanel jPanel12;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JPanel jPanel7;
    private javax.swing.JPanel jPanel8;
    private javax.swing.JPanel jPanel9;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JTextArea jTextArea1;
    private javax.swing.JTextArea jTextArea2;
    private javax.swing.JPanel mainPanel;
    private javax.swing.JMenuBar menuBar;
    private javax.swing.JMenu newEditMenu;
    private javax.swing.JButton okBT;
    private javax.swing.JComboBox productCodeCB;
    private javax.swing.JComboBox productColorCB;
    private javax.swing.JTextField productDiscountTF;
    private javax.swing.JTextField productMRPTF;
    private javax.swing.JComboBox productNameCB;
    private javax.swing.JTextField productQtyTF;
    private java.util.List<svp.ProductTbl> productTblList;
    private java.util.List<svp.ProductTbl> productTblNameList;
    private javax.persistence.Query productTblNameQuery;
    private javax.persistence.Query productTblQuery;
    private javax.swing.JComboBox productUnitCB;
    private javax.swing.JTextField productVATTF;
    private javax.swing.JProgressBar progressBar;
    private javax.swing.JRadioButton quotationRB;
    private javax.swing.JMenu reportsMenu;
    private javax.swing.JRadioButton returnRB;
    private javax.swing.JLabel statusAnimationLabel;
    private javax.swing.JLabel statusMessageLabel;
    private javax.swing.JPanel statusPanel;
    private javax.swing.JPanel toolbarPanel;
    private org.jdesktop.beansbinding.BindingGroup bindingGroup;
    // End of variables declaration//GEN-END:variables

    private final Timer messageTimer;
    private final Timer busyIconTimer;
    private final Icon idleIcon;
    private final Icon[] busyIcons = new Icon[15];
    private int busyIconIndex = 0;
    private JDialog aboutBox;
    private JDialog customerEntryForm;
    private JDialog productEntryForm;
    private JDialog companyEntryForm;
    CustomerEntryForm cef;
     
}
